package com.m3958.firstgwt.client.place;

import com.m3958.firstgwt.client.MyPlace;
import com.m3958.firstgwt.client.types.ViewNameEnum;

public class CommentEditPlace extends MyPlace{
	
	private String parentId;
	
	private String commentId;
	
	
	public CommentEditPlace(String allParams){
		String[] ss = allParams.split(",");
		this.parentId = ss[0];
		if(ss.length > 1)this.commentId = ss[1];
	}
	
	public CommentEditPlace(String parentId,String commentId){
		this.parentId = parentId;
		this.commentId = commentId;
	}

	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}


	@Override
	public String getToken() {
		return ViewNameEnum.COMMENT_EDIT.toString().toLowerCase() + "/" + parentId + "," + commentId;
	}

	public void setCommentId(String commentId) {
		this.commentId = commentId;
	}

	public String getCommentId() {
		return commentId;
	}

}
